{% extends 'EasyVoteBundle::layout.html.twig' %}

{% block content %}
    <div class="container" style="padding-top: 20px;">
        <div class="row row-centered">
            <div class="col-md-4 col-centered">
                <div class="panel panel-default">
                    <div class="panel-body text-center">
                        <strong>You have successfully voted in {{ vote.election.title }}.</strong><br/>
                        <strong>Please save this receipt for your records:</strong><br/>
                        <strong>Vote ID: {{ vote.id }}</strong><br/>

                        {% if vote.profile is defined %}
                            {% if vote.profile.user is defined %}
                                {% if vote.profile.user.displayName is defined %}
                                    You voted for: {{ vote.profile.user.displayName }}<br/>
                                {% elseif vote.profile.user.euid is defined %}
                                    You voted for: {{ vote.profile.user.euid }}<br/>
                                {% else %}
                                    Error 1!!!!!!<br/>
                                {% endif %}
                            {% elseif vote.profile.title is defined %}
                                You voted for: {{ vote.profile.title }}<br/>
                            {% else %}
                                Error 2!!!!!<br/>
                            {% endif %}
                        {% else %}
                            Error 3!!!!!<br/>
                        {% endif %}
                    </div>

                    <div class="panel-footer text-center">
                        <h5>Share To:</h5>
                        <a href="https://www.facebook.com/sharer/sharer.php?app_id=309437425817038&u={{ app.request.getUri() }}&display=popup&ref=plugin"><img src="{{ asset('bundles/easyvote/images/facebook_32.png') }}" height="18" width="18"></a>
                        <a href="https://twitter.com/intent/tweet?original_referer={{ app.request.getUri() }}&tw_p=tweetbutton&url={{ app.request.getUri() }}"><img src="{{ asset('bundles/easyvote/images/twitter_32.png') }}" height="18" width="18"></a>
                        <a href="https://plus.google.com/share?url={{ app.request.getUri() }}"><img src="{{ asset('bundles/easyvote/images/googleplus_32.png') }}" height="18" width="18"></a>
                        <a href="mailto:?to=&Subject=I%20just%20voted%20in&Body=I%20just%20voted%20in%20come.%20Come%20vote%20too%21"><img src="{{ asset('bundles/easyvote/images/email_32.png') }}" height="18" width="18"></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}